package org.ali.structuralpattern.compositepattern.node;

import org.ali.structuralpattern.compositepattern.component.Component2;

/**
 * 叶子节点
 */
public class leaf2 implements Component2 {
    private final String name;

    public leaf2(String name) {
        this.name = name;
    }

    @Override
    public void showMessage() {
        System.out.println(name + "叶子节点");
    }
}
